#ifndef NANE_WAVSOUNDDECODER_H
#   define  NANE_WAVSOUNDDECODER_H

#   include "nane/CodecSystem/Sound/ISoundCodecSystem.h"
#   include "nane/core/crt/FileSystem.h"

namespace nane
{
    class WAVSoundDecoder
        : public ISoundDecoder
    {
    public:
        WAVSoundDecoder();
        ~WAVSoundDecoder();
        
        bool Initialize( IInputRef* _input );
        void Shutdown();
        
    public:
        uint32 GetFrequency();
        uint16 GetChannels();
        uint16 GetBitsPerSample();
        uint32 GetLengthInBytes();
        
        uint32 Read( byte* _buffer, uint32 _count );
        
    private:
        InputPtr m_inputPtr;
        uint32 m_dataSize;
        uint16 m_channels;
        uint32 m_frequency;
        uint16 m_bitsPerSample;
        uint32 m_bytesRead;
    };
}   // namespace nane

#endif	// NANE_WAVSOUNDDECODER_H
